/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.restaurant.domain;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author root
 */
@Entity
@Table(name = "leavetype")
@XmlRootElement(name = "leavetype")
@NamedQueries({
    @NamedQuery(name = "Leavetype.findAll", query = "SELECT l FROM Leavetype l"),
    @NamedQuery(name = "Leavetype.findByLeavetypeID", query = "SELECT l FROM Leavetype l WHERE l.leavetypeID = :leavetypeID"),
    @NamedQuery(name = "Leavetype.findByLeavetypename", query = "SELECT l FROM Leavetype l WHERE l.leavetypename = :leavetypename"),
    @NamedQuery(name = "Leavetype.findByNumberofleaves", query = "SELECT l FROM Leavetype l WHERE l.numberofleaves = :numberofleaves"),
    @NamedQuery(name = "Leavetype.findByIsdeleted", query = "SELECT l FROM Leavetype l WHERE l.isdeleted = :isdeleted")})
public class Leavetype implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "LeavetypeID")
    private Long leavetypeID;
    @Column(name = "leavetypename")
    private String leavetypename;
    @Column(name = "numberofleaves")
    private Float numberofleaves;
    @Column(name = "isdeleted")
    private Boolean isdeleted;
    
    public Leavetype() {
    }

    public Leavetype(Long leavetypeID) {
        this.leavetypeID = leavetypeID;
    }

    public Long getLeavetypeID() {
        return leavetypeID;
    }

    public void setLeavetypeID(Long leavetypeID) {
        this.leavetypeID = leavetypeID;
    }

    public String getLeavetypename() {
        return leavetypename;
    }

    public void setLeavetypename(String leavetypename) {
        this.leavetypename = leavetypename;
    }

    public Float getNumberofleaves() {
        return numberofleaves;
    }

    public void setNumberofleaves(Float numberofleaves) {
        this.numberofleaves = numberofleaves;
    }

    public Boolean getIsdeleted() {
        return isdeleted;
    }

    public void setIsdeleted(Boolean isdeleted) {
        this.isdeleted = isdeleted;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (leavetypeID != null ? leavetypeID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Leavetype)) {
            return false;
        }
        Leavetype other = (Leavetype) object;
        if ((this.leavetypeID == null && other.leavetypeID != null) || (this.leavetypeID != null && !this.leavetypeID.equals(other.leavetypeID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.restaurant.domain.Leavetype[leavetypeID=" + leavetypeID + "]";
    }

}
